import {
  HttpApi
} from '../../../model/index.js'
const httpApi = new HttpApi
Page({
  data: {
    windowHeight:100,
    activeTabIndex:'0',
    records: [],
    userId: "",
    start: 1,
    size: 300,
    userinfo: {
      score: "",
      feedbackNum: 1,
      nikeName: "",
      communityId: "",
      communityName: "",
      userId: "",
    },
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var login = wx.getStorageSync('login')
    
    //设置scroll-view高度
    wx.getSystemInfo({
      success: function (res) {
        that.setData({windowHeight: res.windowHeight - 66});
      }
    });
    var _userId = wx.getStorageSync('userId')
    httpApi.dhList().then(res => {
      that.setData({
        records: res.data
      })
      console.log("1111111:", res.data)
    });
  },
  // 切换tab
  tabChange(event) {
    let index = event.currentTarget.dataset.index;
    this.setData({ activeTabIndex: index });
  },
})
